
package com.quartet.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 统计周期类型 1：天 2：周 3：月
 * </p>
 *
 * @author Zheng Jie
 * @date 2020-05-07
 */
@Getter
@AllArgsConstructor
public enum QueryTypeEnum {

    DAY("1", "天"),
    WEEK("2", "周"),
    MONTH("3", "月");
    private final String value;
    private final String description;

    public static QueryTypeEnum find(String val) {
        for (QueryTypeEnum dataScopeEnum : QueryTypeEnum.values()) {
            if (val.equals(dataScopeEnum.getValue())) {
                return dataScopeEnum;
            }
        }
        return null;
    }

}
